//
// Disable ms-clear pseudo-element globally to avoid confusion with the
// existing clearable integration in TYPO3
//
// https://msdn.microsoft.com/en-us/library/windows/apps/hh465740.aspx
//
*::-ms-clear {
	display: none;
}

//
// Form
//
#typo3-docbody form {
	margin-bottom: 1.25em;
}

//
// Go back A-tags
//
a.typo3-goBack {
	font-weight: bold;
	img {
		margin-right: 5px;
		vertical-align: middle;
	}
}
span.typo3-moduleHeader img {
	margin-right: 4px;
	vertical-align: middle;
}

//
// Form control state additions
//
.has-change {
	.form-control-validation(@state-info-text; @state-info-text; @state-info-bg);

	.thumbnail-status {
		border: 1px solid @state-info-text;
	}
}

//
// Input group additions
//
.input-group-icon {
	width: 32px;
	vertical-align: middle;
	img {
		width: auto;
		max-height: 18px;
	}
}
.input-group-addon {
	min-width: 2.5em;
}

//
// Form control additions
//
.form-control {
	min-width: 120px;
}
.form-control-adapt {
	width: auto;
	max-width: 100%;
}
.form-control-wrap {
	margin: 9px 0;
}
.form-control-holder {
	position: relative;
}
.row {
	> .form-group {
		> .form-control-wrap {
			margin-bottom: 0;
		}
	}
}

//
// Select
//
select {
	&.form-control {
		&[multiple],
		&[size]{
			min-height: 156px;
			width: 100%!important;
		}
		&[size="1"] {
			height: @input-height-base;
			min-height: 0;
		}
		> optgroup {
			margin-top: 9px;
			&:first-child {
				margin-top: 0;
			}
		}
		option {
			padding-top: 2px;
			padding-bottom: 2px;
		}
	}
	&.icon-select {
		option {
			padding-left: 22px;
		}
	}
}

//
// Styles for the "clearable" jquery plugin.
//
.form-control-clearable {
	position: relative;
	.form-control {
		padding-right: 2.3em;
	}
	.close {
		position: absolute;
		z-index: 3;
		font-size: 1.2em;
		top: 50%;
		right: 0.5em;
		margin-top: -0.55em;
		&:before {
			line-height: 1.5em;
		}
	}
}
.input-group {
	.form-control-clearable {
		display: table-cell;
		.form-control {
			display: block;
		}
	}
}

//
// Styles for the "capslock" jquery plugin.
//
.form-notice-capslock {
	position: absolute;
	right: 6px;
	top: 50%;
	margin-top: -10px;
	height: 20px;
	width: 20px;
	padding: 3px;
	z-index: 10;
	background-color: #fff;
	> img {
		display: block;
		opacity: 0.5;
	}
}

//
// Form Inline adjustments
//
.form-inline-spaced {
	margin: 0 -0.5em @line-height-computed;
	.form-group {
		margin: 0.5em 0.5em 0;
		label {
			margin-right: 0.5em;
		}
	}
}

//
// Form group additions
//
.form-group-dashed {
	& + .form-group-dashed {
		padding-top: 15px;
		border-top: 1px dashed #ccc;
	}
}

//
// Form Sections
//
.form-section {
	border: 1px solid #cccccc;
	background-color: #fafafa;
	padding: 15px 12px 3px;
	& + .form-section {
		margin-top: -1px;
	}
}
.tab-pane {
	> .form-section:first-child {
		border-top: none;
	}
}
.form-section-headline {
	margin-top: 0;
	margin-bottom: 10px;
}

//
// Form Wizards
//
.form-wizards-wrap {
	&.form-wizards-top {
		> .form-wizards-items {
			margin-bottom: 9px;
		}
	}
	&.form-wizards-bottom {
		> .form-wizards-element {
			margin-bottom: 9px;
		}
	}
	&.form-wizards-aside {
		display: table;
		width: 100%;
		> .form-wizards-element {
			width: 100%;
		}
		> .form-wizards-element,
		> .form-wizards-items {
			display: table-cell;
			vertical-align: top;
		}
		> .form-wizards-items {
			white-space: nowrap;
			padding-left: 5px;
		}
	}
}
.form-wizards-element {
	> .table-fit {
		margin-bottom: 9px;
	}
}

//
// Form Irre
//
.form-irre-header {
	display: table;
	margin: -5px;
	.user-select(none);
}
.form-irre-header-cell {
	display: table-cell;
	vertical-align: middle;
	white-space: nowrap;
	padding: 5px;
}
.form-irre-header-body {
	width: 100%;
	font-weight: normal;
	dl {
		.dl-horizontal();
		margin-bottom: 0;
	}
}
.form-irre-header-icon {
	padding-right: 0;
}
.form-irre-header-control {
	cursor: auto;
	.btn-group > .btn {
		float: none;
	}
}

//
// Form Multi Group
//
.form-multigroup-wrap {
	width: 100%;
	display: table;
	.form-multigroup-item {
		display: table-cell;
		width: 50%;
		vertical-align: top;
		+ .form-multigroup-item {
			padding-left: 5px;
		}
	}
	.form-multigroup-item-wizard {
		margin-bottom: 5px;
		+ select.form-control[multiple],
		+ select.form-control[size] {
			min-height: 125px;
		}
	}
	.form-wizards-wrap {
		width: 100%;
	}
}

//
// Radio & Checkbox
//
.radio-row,
.checkbox-row {
	margin-top: 10px;
	margin-bottom: 5px;
}
.radio-column,
.checkbox-column {
	margin-bottom: 5px;
	> .radio,
	> .checkbox {
		margin: 0;
	}
}
.radio-inline,
.checkbox-inline {
	&.radio,
	&.checkbox {
		display: block;
		margin-left: 0;
		margin-right: 10px;
		margin-bottom: 10px;
		padding: 0;
		@media (max-width: @screen-xs-max) {
			& + .radio,
			& + .checkbox {
				margin-top: -5px;
			}
		}
		@media (min-width: @screen-sm-min) {
			display: inline-block;
			margin-top: 10px;
			label {
				white-space: nowrap;
			}
		}
	}
}

//
// Autoresize for Textareas
//
// no manual resizing for textareas (works on non-IE browser only anyways)
// as it is handled by JS: "autosize"
//
textarea {
	&.t3js-formengine-textarea {
		resize: none;
	}
}
